package cn.hznc.domain.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Getter;
import lombok.Setter;

import java.util.Date;

/**
 * @Author：Administrator
 * @Date：2023/9/22 18:03
 */
@Getter
@Setter
@Table(name = "t_machine_tool_status")
@TableName(value = "t_machine_tool_status")
public class MachineToolStatus{

    /**
     * 主键
     */
    @Column(name = "id",type = MySqlTypeConstant.INT,length = 11,isKey = true,isAutoIncrement = true)
    @TableId(type = IdType.INPUT)
    private Integer id;

    /**
     * 机床sn号
     */
    @Column(name = "sn_code",type = MySqlTypeConstant.VARCHAR,length = 50)
    @TableField("sn_code")
    private String snCode;

    /**
     * 状态
     */
    @Column(name = "status",type = MySqlTypeConstant.VARCHAR)
    @TableField("status")
    private String status;

    /**
     * 状态
     */
    @Column(name = "create_time",type = MySqlTypeConstant.DATETIME)
    @TableField("create_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    /**
     * 状态
     */
    @Column(name = "program",type = MySqlTypeConstant.VARCHAR)
    @TableField("program")
    private String program;

    /**
     * 状态
     */
    @Column(name = "sub_program",type = MySqlTypeConstant.VARCHAR , length = 200)
    @TableField("sub_program")
    private String subProgram;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date startTime;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @TableField(exist = false)
    private Date endTime;

    @Column(name = "bz",type = MySqlTypeConstant.VARCHAR , length = 150)
    @TableField("bz")
    private String bz;

    @Column(name = "time",type = MySqlTypeConstant.BIGINT , length = 20)
    @TableField("time")
    private Long time;
}
